package com.chenxingnet.service.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.chenxingnet.dao.DepartmentMapper;
import com.chenxingnet.dto.Department;
import com.chenxingnet.service.DepartmentService;

@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService{

	
	@Resource
	DepartmentMapper  departmentDao;

	public void addDept(Department department) {
		departmentDao.insertSelective(department);
	}

	public List<Department> showDept() {
		
		return departmentDao.selectAll();
	}

	public Department selectById(Integer id) {
		return departmentDao.selectByPrimaryKey(id);
	}

	public List<Department> getDepByName(String depName) {
		return departmentDao.getDepByName(depName);
	}
	
	
	
	
	

}
